<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    * {
      -webkit-box-sizing: border-box;
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html,
    body {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    iframe {
      width: 100%;
      height: 100%;
      border: 0;
    }

    @media screen and (max-width: 900px) {
      .content {
        width: 100%;
        height: 100%;
        background: url("../images/bg.png") no-repeat;
        background-size: 100% 100%;
        position: relative;
        overflow: auto;
      }
      .content .remark {
        position: absolute;
        bottom: 5.33333vw;
        left: 0;
        width: 100%;
        text-align: center;
        font-size: 3.73333vw;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.64);
      }
      .content .dialog {
        position: absolute;
        top: 50%;
        left: 50%;
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        width: 91.46667vw;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 2.13333vw;
        padding: 10.66667vw 6.4vw 13.86667vw 6.4vw;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
      }
      .content .dialog .header {
        width: 100%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
      }
      .content .dialog .header img {
        width: 12vw;
      }
      .content .dialog .header .text {
        width: calc(100% - 12vw);
        padding-left: 2.66667vw;
      }
      .content .dialog .header .text .title {
        font-size: 6.4vw;
        font-family: Microsoft YaHei;
        font-weight: bold;
        color: #0057aa;
        letter-spacing: 0.53333vw;
      }
      .content .dialog .header .text .subtitle {
        font-size: 3.2vw;
        font-family: Arial;
        font-weight: 400;
        color: rgba(0, 41, 81, 0.4);
      }
      .content .dialog .entry {
        margin: 10.66667vw 0 5.33333vw 0;
      }
      .content .dialog .entry .title {
        font-size: 4.26667vw;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: rgba(0, 41, 81, 0.48);
      }
      .content .dialog .entry .input {
        margin: 1.06667vw 0 2.13333vw 0;
        width: 78.66667vw;
        height: 17.06667vw;
        background: white;
        border: 0.26667vw solid rgba(0, 41, 81, 0.121569);
        border-radius: 1.6vw;
        position: relative;
      }
      .content .dialog .entry .input .image-remove {
        position: absolute;
        width: 6.66667vw;
        right: 1.33333vw;
        top: 5.33333vw;
        display: none;
      }
      .content .dialog .entry .input .delete {
        position: absolute;
        right: 1.33333vw;
        top: 4.8vw;
        width: 6.66667vw;
        height: 6.66667vw;
        background: #e6e7ec;
        border-radius: 50%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
      }
      .content .dialog .entry .input .delete:after {
        content: "\2716";
        color: #fff;
      }
      .content .dialog .entry .input input {
        width: 100%;
        height: 100%;
        background: none;
        outline: none;
        border: none;
        font-size: 6.93333vw;
        font-family: Arial;
        font-weight: 400;
        line-height: 17.06667vw;
        color: #002951;
        letter-spacing: 1.06667vw;
        text-align: center;
      }
      .content .dialog .entry .input input:focus {
        border: none;
      }
      .content .dialog .entry .err {
        font-size: 3.2vw;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #ff0922;
        visibility: hidden;
      }
      .content .dialog .btn {
        position: relative;
        text-align: center;
        width: 78.66667vw;
        height: 14.93333vw;
        background: #0057aa;
        border: 0.26667vw solid white;
        border-radius: 1.6vw;
        font-size: 5.33333vw;
        font-family: Microsoft YaHei;
        font-weight: 400;
        line-height: 14.93333vw;
        color: white;
        letter-spacing: 0.53333vw;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }
      .content .dialog .btn:active {
        opacity: 0.8;
      }
      .content .dialog .btn:before {
        content: "";
        position: absolute;
        top: -1.33333vw;
        left: -1.33333vw;
        width: 78.8vw;
        height: 14.93333vw;
        border: 1.06667vw solid rgba(0, 87, 170, 0.12);
        border-radius: 2.13333vw;
      }
    }

    @media screen and (min-width: 900px) {
      .content {
        width: 100%;
        height: 100%;
        background: url("../images/bg.png") no-repeat;
        background-size: 100% 100%;
        position: relative;
        overflow: auto;
      }
      .content .remark {
        position: absolute;
        bottom: 40px;
        left: 0;
        width: 100%;
        text-align: center;
        font-size: 28px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.64);
      }
      .content .dialog {
        position: absolute;
        top: 50%;
        left: 50%;
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        width: 686px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 16px;
        padding: 80px 48px 104px 48px;
      }
      .content .dialog .header {
        width: 100%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
      }
      .content .dialog .header img {
        width: 90px;
      }
      .content .dialog .header .text {
        width: calc(100% - 90px);
        padding-left: 20px;
      }
      .content .dialog .header .text .title {
        font-size: 48px;
        font-family: Microsoft YaHei;
        font-weight: bold;
        color: #0057aa;
        letter-spacing: 4px;
      }
      .content .dialog .header .text .subtitle {
        font-size: 24px;
        font-family: Arial;
        font-weight: 400;
        color: rgba(0, 41, 81, 0.4);
      }
      .content .dialog .entry {
        margin: 80px 0 40px 0;
      }
      .content .dialog .entry .title {
        font-size: 32px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: rgba(0, 41, 81, 0.48);
      }
      .content .dialog .entry .input {
        margin: 8px 0 16px 0;
        width: 590px;
        height: 128px;
        background: white;
        border: 2px solid rgba(0, 41, 81, 0.121569);
        border-radius: 12px;
        position: relative;
      }
      .content .dialog .entry .input .image-remove {
        position: absolute;
        width: 50px;
        right: 10px;
        top: 40px;
        display: none;
      }
      .content .dialog .entry .input .delete {
        position: absolute;
        right: 10px;
        top: 36px;
        width: 50px;
        height: 50px;
        background: #e6e7ec;
        border-radius: 50%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
      }
      .content .dialog .entry .input .delete:after {
        content: "\2716";
        color: #fff;
      }
      .content .dialog .entry .input input {
        width: 100%;
        height: 100%;
        background: none;
        outline: none;
        border: none;
        font-size: 52px;
        font-family: Arial;
        font-weight: 400;
        line-height: 128px;
        color: #002951;
        letter-spacing: 8px;
        text-align: center;
      }
      .content .dialog .entry .input input:focus {
        border: none;
      }
      .content .dialog .entry .err {
        font-size: 24px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #ff0922;
        visibility: hidden;
      }
      .content .dialog .btn {
        position: relative;
        text-align: center;
        width: 590px;
        height: 112px;
        background: #0057aa;
        border: 2px solid white;
        border-radius: 12px;
        font-size: 40px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        line-height: 112px;
        color: white;
        letter-spacing: 4px;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }
      .content .dialog .btn:active {
        opacity: 0.8;
      }
      .content .dialog .btn:before {
        content: "";
        position: absolute;
        top: -10px;
        left: -8px;
        width: 606px;
        height: 128px;
        background: rgba(0, 87, 170, 0.12);
        border-radius: 16px;
      }
    }
  </style>
  <body>
    <div id="vrContent" class="content">
      <div class="dialog">
        <div class="header">
          <!-- <img src="./images/GBSlogo.png" alt="" /> -->
          <div class="text">
            <div class="title">精工绿筑云展厅</div>
            <div class="subtitle">Jinggong GBS Cloud Hall</div>
          </div>
        </div>
        <div class="entry">
          <div class="title">输入体验码</div>
          <div class="input">
            <input type="text" oninput="inputValue()" />
            <!-- <div class="delete" onclick="remove()"></div> -->
            <!-- <img
              class="image-remove"
              onclick="remove()"
              src="./images/icon-clear.png"
              alt=""
            /> -->
          </div>
          <div class="err">体验码错误，请重新输入</div>
        </div>
        <div class="btn" onclick="btn()">开始漫游</div>
      </div>
      <!-- <div class="remark" onclick="window.open('http://www.bimforest.com/')">量树科技 BIMFOREST TECH.</div> -->
    </div>
    <iframe id="vrIframe" src="" frameborder="0"></iframe>

    <script>
      function btn() {
        const value = document.querySelectorAll(".entry input")[0].value;
        const err = document.querySelectorAll(".entry .err")[0];

        // $.ajax({
        //   type: "GET",
        //   url: "/getCode",
        //   data: {
        //     verCode: value,
        //   },
        //   dataType: "json",
        //   success: function (data) {
        //     if (data.code === 1) {
        //       //成功跳转
              let vrContent = document.getElementById("vrContent");
              let vrIframe = document.getElementById("vrIframe");
              let height = document.body.offsetHeight;
              vrContent.style.display = "none";
              vrIframe.style.height = `${height}px`;
              setTimeout(() => {
                vrIframe.src = "https://720yun.com/t/b6vkOe29sfq?from=singlemessage#scene_id=51877022";
              }, 100);
        //     } else {
        //       err.style.visibility = "visible";
        //     }
        //   },
        // });
      }

      function inputValue() {
        const err = document.querySelectorAll(".entry .err")[0];
        err.style.visibility = "hidden";

        let remove = document.querySelectorAll(".entry .image-remove")[0];
        const value = document.querySelectorAll(".entry input")[0].value;
        if (value) {
          remove.style.display = "block";
        } else {
          remove.style.display = "none";
        }
      }

      function remove() {
        const value = document.querySelectorAll(".entry input")[0];
        const err = document.querySelectorAll(".entry .err")[0];
        value.value = "";
        err.style.visibility = "hidden";
      }
    </script>
  </body>
</html>